package com.aaa.service.front;

import com.aaa.entity.Goods;
import com.aaa.entity.ShoppingCartDetail;

import java.util.List;
import java.util.Map;

public interface IShoppingCartDetailService {
    /**
     * 根据购物车编号查询购物车明细
     * @param shoppingCartId
     * @return
     */
    List<ShoppingCartDetail> findShoppingCartDetail(Integer shoppingCartId);

    /**
     * 在购物车明细中添加商品
     * @param shoppingCartDetail
     * @return
     */
    int insertGoods(ShoppingCartDetail shoppingCartDetail);

    /**
     * 更新商品数量
     * @param goodsId,shoppingCartId,goodsNum
     * @return
     */
    int updateGoodsNum(String goodsId, Integer shoppingCartId, Integer goodsCount);

    /**
     * 根据购物车编号和商品编号查询购物车明细
     * @param shoppingCartId,goodsId
     * @return
     */
    ShoppingCartDetail findShoppingCartDetailByGoodsIdAndShoppingCartId(String goodsId,Integer shoppingCartId);


    /**
     * 根据购物车编号和商品编号删除商品
     * @param shoppingCartId,goodsId
     * @return
     */
    int deleteGoodsDetail(Integer shoppingCartId, String goodsId);
}
